package com.yuan.balanceflow.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuan.balanceflow.entity.WalletTransactions;
import com.yuan.balanceflow.mapper.WalletTransactionsMapper;
import com.yuan.balanceflow.service.IWalletTransactionsService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yuan_boss
 * @since 2023-03-17
 */
@Service
public class WalletTransactionsServiceImpl extends ServiceImpl<WalletTransactionsMapper, WalletTransactions> implements IWalletTransactionsService {

    //查询用户钱包金额变动明细
    @Override
    public List<WalletTransactions> getWalletTransactionsById(Integer id) {
        QueryWrapper<WalletTransactions> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_id",id);
        List<WalletTransactions> list = baseMapper.selectList(queryWrapper);
        return list;
    }
}
